import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/packageFrontConfig/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}


export const getPage = (current, size, params) => {
  return request({
    url: '/api/packageFrontConfig/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/packageFrontConfig/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/packageFrontConfig/remove',
    method: 'post',
    params: {
      idList:ids,
    }
  })
}
 
export const add = (row) => {
  return request({
    url: '/api/packageFrontConfig/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/packageFrontConfig/edit',
    method: 'post',
    data: row
  })
}


export const getPlanTree = (id) => {
  return request({
    url: '/api/packageFrontConfig/detail',
    method: 'get',
    params: {
      id
    }
  })
} 